package com.it.travel.controller;

import com.it.travel.service.DetailService;
import com.it.travel.vo.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/detail")
@CrossOrigin
public class DetailController {

    @Resource
    private DetailService detailService;

    @GetMapping("/{id}")
    public Result<?> getDetail(@PathVariable("id") Integer id) {
        Result<?> result = detailService.getDetail(id);
        return result;
    }

    @GetMapping("/ticket/{id}")
    public Result<?> getDetailTicket(@PathVariable("id") Integer id) {
        Result<?> result = detailService.getDetailTicket(id);
        return result;
    }

}
